package com.xishu.entity.member;

import com.xishu.annotation.dao.DefaultValue;
import com.xishu.annotation.dao.Hidden;
import com.xishu.entity.AbstractEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;
import java.io.Serializable;

@Data
@Entity(name = "member")
@Table(indexes = {@Index(columnList = "memberId")})
public class Member extends AbstractEntity implements Serializable {

    private static final long serialVersionUID = -5046220851057469738L;

    @ApiModelProperty(value = "memberId")
    private String memberId;

    @ApiModelProperty(value = "name")
    private String name;

    @ApiModelProperty(value = "昵称")
    private String nickName;

    @ApiModelProperty(value = "归属哪一个商家")
    private Long companyId;

    @ApiModelProperty(value = "电话号码")
    private String phone;

    @ApiModelProperty(value = "区号")
    private String areaCode;

    @ApiModelProperty(value = "出生年月日")
    private Long birthDay;

    @ApiModelProperty(value = "积分")
    @DefaultValue(defaultValue = "0")
    private Integer score;

    @ApiModelProperty(value = "积分历史值，一直累加的")
    private Integer scoreHistory;

    @ApiModelProperty(value = "rank")
    private String mRank;

    @ApiModelProperty(value = "RankExpireDate")
    private String mRankExpireDate;

    @ApiModelProperty(value = "性别, 1男2女")
    private Integer sex;

    @ApiModelProperty(value = "sta")
    private String sta;

    @ApiModelProperty(value = "盐值")
    @Hidden
    private String salt;

    @ApiModelProperty(value = "registerTime")
    private String registerTime;

    @ApiModelProperty(value = "密码")
    @Hidden
    private String password;

    @ApiModelProperty(value = "accountInfo")
    private String accountInfo;

    @ApiModelProperty(value = "optionalContact")
    private String optionalContact;

    @ApiModelProperty(value = "scondaryInfo")
    private String scondaryInfo;

    @ApiModelProperty(value = "registerInfo")
    private String registerInfo;

    @ApiModelProperty(value = "deliveryAddress")
    private String deliveryAddress;

    @ApiModelProperty(value = "payMethod")
    private String payMethod;

    @ApiModelProperty(value = "loginMethod")
    private String loginMethod;

    @ApiModelProperty(value = "census")
    private String census;

    @ApiModelProperty(value = "favors")
    private String favors;


}
